class Patient < ActiveRecord::Base
  belongs_to :hospice_branch
  belongs_to :race
  belongs_to :diagnosis
  
  belongs_to :res_address_suburb, :class_name => "Suburb", :foreign_key => "res_address_suburb_id"
  belongs_to :post_address_suburb, :class_name => "Suburb", :foreign_key => "post_address_suburb_id"
  belongs_to :emp_address_suburb, :class_name => "Suburb", :foreign_key => "emp_address_suburb_id"
  
  belongs_to :marital_status
  belongs_to :medical_aid
  belongs_to :medical_insurer
  belongs_to :undertaker
  belongs_to :burial_type
  belongs_to :referring_institute
  
  belongs_to :referring_doctor, :class_name => "Doctor", :foreign_key => "referring_doctor_id"
  belongs_to :hospice_doctor, :class_name => "Doctor", :foreign_key => "hospice_doctor_id"
  
  belongs_to :sister, :class_name => "Resource", :foreign_key => "sister_id"
  belongs_to :social_worker, :class_name => "Resource", :foreign_key => "social_worker_id"
  
  belongs_to :patient_status
  belongs_to :death_location
  belongs_to :admission_reason
  
  has_many :patient_histories
end
